In some instances, it is desirable to treat computer program instructions as data objects. This need arises, for example, when a computer programmer is writing a computer program that accesses data from another application. For example, a programmer writing a program in the C programming language may wish to access a database that responds to queries written in the SQL programming language. To query the database from the C program, the C programmer may insert SQL commands as strings in the C program. A C compiler does not convert the strings into executable code. Rather, the C compiler stores the strings literally as they were entered by the programmer.
As the C program executes, the strings will be passed to an application programming interface (API) for the database. The API may compile or interpret the string and provide the appropriate commands to the database to perform the desired access to the database.
Compilers for languages such as Lisp/Scheme, MetaML, and Template-Haskel will also create data objects representing code in a source code file, if the code is explicitly quoted in the source code file.